#ifndef OBBRICKSP_H
#define OBBRICKSP_H

#include "d3dx9.h"
#include "ObStatic.h"
#include "ObDynamic.h"
#include "ObCoinUp.h"
#include <vector>


class ObBrickSP : public ObStatic{
public:
	enum BRICKSP { BRICKSP1 = 40, BRICKSP2, BRICKSP3, BRICKSP4 };
	enum INFO { NAM = 1, HOA, SAO, NAMHOA, TIEN, TIEN10, TIEN12, TIEN20, NAMLV, NOTHING };

	ObBrickSP();
	ObBrickSP(BRICKSP nid, INFO ninfo);
	~ObBrickSP();

	bool setId(int nid);
	bool setInfo(int ninfo);
	static bool checkType(int obID);
	static bool checkInfo(int ninfo);
	bool getCanKill();
	void setCanKill(bool cankill);

	void collidedWith(ObObject* object, CollisionRS rs);
	void update(float dt);
	void render(ID3DXSprite* mSprite);

	static bool loadTexture();
	static bool releaseTexture();
private:
	static	IDirect3DTexture9* mTex;
	static	IDirect3DTexture9* mStuffTex;
	static  IDirect3DTexture9* mCoinTex;
	static  CSound* sBonusAppear;
	static  CSound* sCoin;

	int		mCoin;
	bool	mCanKill;
	float	delaycount;
	std::vector<ObCoinUp*> mList;
	ObDynamic* mTriggerObject;
};
#endif